/*
 * TableColumnElement.cpp
 *
 *  Created on: 2010-6-7
 *      Author: guobc
 */

#include "TableColumnElement.h"
#include "TextNode.h"
using namespace HA;

string TableColumnElement::mIds[] = { "TD" , ""};
string TableColumnElement::mEnds[] = { "TD", "TR", "TBODY", "TFOOT", "THEAD",
		"TABLE" , ""};

TableColumnElement::TableColumnElement() :
	HA::CommonElement() {
}

string TableColumnElement::getTableContent() {
	ASTNodeList children = getChildren();
	ASTNode* node;
	TextNode* textNode;
	int size = children.size();
	for (int i = 0; i < size; i++) {
		node = children.item(i);
		textNode = dynamic_cast<TextNode*> (node);
		if (textNode != NULL) {
			return textNode->getText();
		}
	}

	return "";
}
